package pers.course.test;

import com.sun.source.tree.LambdaExpressionTree;

public class Book {
    private int ISBN;
    private String title, author;
    private int pageCount;

    public int hashCode() {
        return ISBN;
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof Book)) {
            return false;
        }
        Book other = (Book) obj;
        return this.ISBN == other.ISBN;
    }

    public static void main(String[] args) {
        Book book1 = new Book();
        Book book2 = new Book();
        if (book1.equals(book2)) {
            System.out.println("true");
        }
    }
}
